From fc6ee2ba09f7e50b85c2da4478789aa1046a2799 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 31 Jan 2009 10:08:37 +0000 Subject: [PATCH] (rmail-redecode-body): Don't change EOL conversion of the new encoding if the old one left it unspecified. --- lisp/mail/rmail.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 6651b3fc236..4453adbd143 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -2687,9 +2687,10 @@ iso-8859, koi8-r, etc." ;; Make sure the new coding system uses the same EOL ;; conversion, to prevent ^M characters from popping up ;; all over the place. - (setq coding - (coding-system-change-eol-conversion - coding (coding-system-eol-type old-coding))) + (let ((eol-type (coding-system-eol-type old-coding))) + (if (numberp eol-type) + (setq coding + (coding-system-change-eol-conversion coding eol-type)))) ;; If old-coding is `undecided', encode-coding-region ;; will not encode the text at all. Find a proper ;; non-trivial encoding to use. -- 2.30.2